package com.ruoyi.purchase.mapper;

import com.ruoyi.purchase.domain.PurchaseOrder;

import java.util.List;

/**
 * 订单详情 purchase_order
 *
 * @author kevinness
 * @date 2025-01-02
 */
public interface PurchaseOrderMapper
{
    /**
     * 查询订单
     *
     * @param orderNo 订单主键
     * @return 订单
     */
    public PurchaseOrder selectPurchaseOrderByOrderNo(String orderNo);

    /**
     * 查询订单->只返回发货前的订单
     *
     * @param orderNo 订单主键
     * @return 订单
     */
    public PurchaseOrder getPurchaseOrderByOrderNo(String orderNo);

    /**
     * 采购执行查询订单列表
     *
     * @param purchaseOrder 订单
     * @return 订单集合
     */
    public List<PurchaseOrder> getExecutionPurchaseOrderList(PurchaseOrder purchaseOrder);

    /**
     * 查询订单列表
     *
     * @param purchaseOrder 订单
     * @return 订单集合
     */
    public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder);

    /**
     * 新增订单
     *
     * @param purchaseOrder 订单
     * @return 结果
     */
    public int insertPurchaseOrder(PurchaseOrder purchaseOrder);

    /**
     * 修改订单
     *
     * @param purchaseOrder 订单
     * @return 结果
     */
    public int updatePurchaseOrder(PurchaseOrder purchaseOrder);

    /**
     * 删除订单
     *
     * @param orderNo 订单主键
     * @return 结果
     */
    public int deletePurchaseOrderByOrderNo(String orderNo);

    /**
     * 批量删除订单
     *
     * @param orderNos 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePurchaseOrderByOrderNos(String[] orderNos);
}